package com.ruoyi.business.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单管理对象 t_order
 * 
 * @author laoguo
 * @date 2025-08-12
 */
public class TOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单ID */
    @Excel(name = "订单ID")
    private Long orderId;

    /** 订单号 */
    @Excel(name = "订单号")
    private String orderSn;

    /** 下单用户ID */
    @Excel(name = "下单用户ID")
    private Long userId;

    /** 订单类型(0商品订单 1碾米订单) */
    @Excel(name = "订单类型(0商品订单 1碾米订单)")
    private String orderType;

    /** 关联设备ID(碾米订单专属) */
    @Excel(name = "关联设备ID(碾米订单专属)")
    private Long deviceId;

    /** 订单状态(0待付款 1待发货 2已发货 3已完成 4已关闭) */
    @Excel(name = "订单状态(0待付款 1待发货 2已发货 3已完成 4已关闭)")
    private String orderStatus;

    /** 订单总金额 */
    @Excel(name = "订单总金额")
    private BigDecimal totalAmount;

    /** 实际支付金额 */
    @Excel(name = "实际支付金额")
    private BigDecimal payAmount;

    /** 支付方式(1微信 2支付宝) */
    @Excel(name = "支付方式(1微信 2支付宝)")
    private String payType;

    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payTime;

    /** 收货地址ID */
    @Excel(name = "收货地址ID")
    private Long addressId;

    /** 收货人姓名 */
    @Excel(name = "收货人姓名")
    private String consigneeName;

    /** 收货人电话 */
    @Excel(name = "收货人电话")
    private String phoneNumber;

    /** 收货人完整地址 */
    @Excel(name = "收货人完整地址")
    private String fullAddress;

    /** 订单包含的商品列表 */
    private List<TOrderItem> orderItems;

    public List<TOrderItem> getOrderItems() {
        return orderItems;
    }

    public void setOrderItems(List<TOrderItem> orderItems) {
        this.orderItems = orderItems;
    }

    public void setOrderId(Long orderId) 
    {
        this.orderId = orderId;
    }

    public Long getOrderId() 
    {
        return orderId;
    }

    public void setOrderSn(String orderSn) 
    {
        this.orderSn = orderSn;
    }

    public String getOrderSn() 
    {
        return orderSn;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setOrderType(String orderType) 
    {
        this.orderType = orderType;
    }

    public String getOrderType() 
    {
        return orderType;
    }

    public void setDeviceId(Long deviceId) 
    {
        this.deviceId = deviceId;
    }

    public Long getDeviceId() 
    {
        return deviceId;
    }

    public void setOrderStatus(String orderStatus) 
    {
        this.orderStatus = orderStatus;
    }

    public String getOrderStatus() 
    {
        return orderStatus;
    }

    public void setTotalAmount(BigDecimal totalAmount) 
    {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTotalAmount() 
    {
        return totalAmount;
    }

    public void setPayAmount(BigDecimal payAmount) 
    {
        this.payAmount = payAmount;
    }

    public BigDecimal getPayAmount() 
    {
        return payAmount;
    }

    public void setPayType(String payType) 
    {
        this.payType = payType;
    }

    public String getPayType() 
    {
        return payType;
    }

    public void setPayTime(Date payTime) 
    {
        this.payTime = payTime;
    }

    public Date getPayTime() 
    {
        return payTime;
    }

    public void setAddressId(Long addressId) 
    {
        this.addressId = addressId;
    }

    public Long getAddressId() 
    {
        return addressId;
    }

    public void setConsigneeName(String consigneeName) 
    {
        this.consigneeName = consigneeName;
    }

    public String getConsigneeName() 
    {
        return consigneeName;
    }

    public void setPhoneNumber(String phoneNumber) 
    {
        this.phoneNumber = phoneNumber;
    }

    public String getPhoneNumber() 
    {
        return phoneNumber;
    }

    public void setFullAddress(String fullAddress) 
    {
        this.fullAddress = fullAddress;
    }

    public String getFullAddress() 
    {
        return fullAddress;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("orderId", getOrderId())
            .append("orderSn", getOrderSn())
            .append("userId", getUserId())
            .append("orderType", getOrderType())
            .append("deviceId", getDeviceId())
            .append("orderStatus", getOrderStatus())
            .append("totalAmount", getTotalAmount())
            .append("payAmount", getPayAmount())
            .append("payType", getPayType())
            .append("payTime", getPayTime())
            .append("addressId", getAddressId())
            .append("consigneeName", getConsigneeName())
            .append("phoneNumber", getPhoneNumber())
            .append("fullAddress", getFullAddress())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
